<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><a style="color: red">*</a>{:__('Images')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-images" class="form-control" data-rule="required" data-msg-required="  " placeholder="請上傳圖片"  size="50" name="row[images]" type="text" value="{$row.images|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-images"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-images"></ul>
        </div>
        <label style="
    padding-top: 4px;
    padding-left: 4px;">請上傳圖片</label>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><a style="color: red">*</a>{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" data-rule="required;length(~50)" class="form-control" name="row[title]" placeholder="請輸入活動標題" type="text" value="{$row.title|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><a style="color: red">*</a>{:__('Cat_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-cat_id" data-rule="required" data-source="activity_category/index" placeholder="請選擇活動分類" class="form-control selectpage" name="row[cat_id]" type="text" value="{$row.cat_id|htmlentities}">
        </div>
    </div>
       <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('是否公開報名')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
          
            <label for="row[is_open]"><input  name="row[is_open]" type="radio" value="1" {$row.is_open==1?'checked':''} />是</label> 
                    <label for="row[is_open]"><input  name="row[is_open]" type="radio" value="0"  {$row.is_open==0?'checked':''}  />否</label> 
            
            </div>

        </div>
    </div>
        <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('活動開始日期')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-arrivaltime" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[start_date]" type="text" value="{:date('Y-m-d',$row.start_date)}" placeholder="請選擇日期">
        </div>
    </div>
     <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('活動結束日期')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-arrivaltime" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[end_date]" type="text" value="{:date('Y-m-d',$row.end_date)}" placeholder="請選擇日期">
        </div>
    </div>
       <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('報名開始時間')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-arrivaltime" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm" data-use-current="true" name="row[start_time]" type="text" value="{:date('Y-m-d H:i',$row.start_time)}" placeholder="請選擇時間">
        </div>
    </div>
     <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('報名結束時間')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-arrivaltime" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD  HH:mm" data-use-current="true" name="row[end_time]" type="text" value="{:date('Y-m-d H:i',$row.end_time)}" placeholder="請選擇時間">
        </div>
    </div>
 <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><a style="color: red">*</a>{:__('時數')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-workinghours" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')" data-rule="required;length(~10);range(0~)" class="form-control" name="row[workinghours]" value="{$row.workinghours}" type="number" value="" placeholder="請輸入工時">
        </div>
    </div>
    {if $admin['affiliated_center_id'] == 0}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><a style="color: red">*</a>所屬中心:</label>
        <div class="row">
            <div class="col-xs-9" id="region_address">
                
                <div class="form-inline" data-toggle="cxselect" data-selects="area_one_id,area_tow_id">
                    <select class="area_one_id form-control" name="row[area_one_id]" data-url="affiliated_center/Area?type=province">
                        {if $province}
                        <option value="{$province.value|htmlentities}" selected>{$province.name|htmlentities}</option>
                        {/if}
                    </select>
                    
                    
                </div>
            </div>
        </div>
    </div>
    {/if}
   
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><a style="color: red">*</a>簡介:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-introduction" data-rule="required" class="form-control" rows="5" name="row[introduction]" cols="50" placeholder="用於分享朋友圈海報生產">{$row.introduction|htmlentities}</textarea>
        </div>
    </div>
   
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><a style="color: red">*</a>{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" data-rule="required" class="form-control editor" rows="5" name="row[content]" cols="50">{$row.content|htmlentities}</textarea>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
